package com.choosefine.base.shixiaobao.common.dto;

import java.util.EnumSet;
import java.util.HashMap;
import java.util.Map;

import com.choosefine.base.shixiaobao.common.json.JsonUtil;


/**
 * Comments：交易类型
 * Create Date：2017/3/8
 * Modified By：
 * Modified Date：
 * Why & What is modified：
 * Version：v1.0
 */
public enum TradeType{
   TRANSFER("转账"),WITHDRAW("提现"),RECHARGE("充值"),PAY_AGENT("代付"), SALARY("工资"),SUBPACKAGE("分包款收入"),SHOPPING("商城付款收入"),  REFUND("退款收入");
   
   private final String value;  
   private static final Map<String, TradeType> lookup = new HashMap<String, TradeType>();  
 
   static {  
       for (TradeType s : EnumSet.allOf(TradeType.class)) {  
           lookup.put(s.getValue(), s);  
       }  
   }  
 
   TradeType(String value) {  
       this.value = value;  
   }  
 
   public String getValue() {  
       return value;  
   }  
 
   public static TradeType lookup(int value) {  
       return lookup.get(value);  
   }  
   
   public static String  getJson() {  
	   return JsonUtil.toJson(lookup);
   }  
}
